An Efficient Algorithm to Test Square-Freeness of Strings Compressed by Balanced Straight Line Programs

نویسندگان

  • Wataru Matsubara
  • Shunsuke Inenaga
  • Ayumi Shinohara
چکیده

In this paper we study the problem of deciding whether a given compressed string contains a square. A string x is called a square if x = zz and z = uk implies k = 1 and u = z. A string w is said to be square-free if no substrings of w are squares. However, very little is known for testing square-freeness of a given compressed string. In this paper, we give an O(max(n2,n log2 N))-time O(n2)-space solution to test squarefreeness of a given compressed string, where n and N are the size of a given compressed string and the corresponding decompressed string, respectively. Our input strings are compressed by balanced straight line program (BSLP). We remark that BSLP has exponential compression, that is, N = O(2n). Hence no decompress-then-test approaches can be better than our method in the worst case.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An Efficient Algorithm to Test Square-Freeness of Strings Compressed by Balanced Straight Line Program

In this paper we study the problem of deciding whether a given compressed string contains a square. A string x is called a square if x = zz and z = u implies k = 1 and u = z. A string w is said to be square-free if no substrings of w are squares. Many efficient algorithms to test if a given string is square-free, have been developed so far. However, very little is known for testing square-freen...

متن کامل

Testing Square-Freeness of Strings Compressed by Balanced Straight Line Program

In this paper we study the problem of deciding whether a given compressed string contains a square. A string x is called a square if x = zz and z = u implies k = 1 and u = z. A string w is said to be square-free if no substrings of w are squares. Many efficient algorithms to test if a given string is square-free, have been developed so far. However, very little is known for testing square-freen...

متن کامل

Fully Compressed Pattern Matching Algorithm for Balanced Straight-Line Programs

We consider a fully compressed pattern matching problem, where both text T and pattern P are given by its succinct representation, in terms of straight-line programs and its variant. The length of the text T and pattern P may grow exponentially with respect to its description size n and m, respectively. The best known algorithm for the problem runs in O(nm) time using O(nm) space. In this paper...

متن کامل

Faster fully compressed pattern matching algorithm for a subclass of straight-line programs

We show an efficient pattern-matching algorithm for strings that are succinctly described in terms of straight-line programs, in which the constants are symbols and the only operation is the concatenation. In this paper, both text T and pattern P are given by straight-line programs T and P. The length of the text T (pattern P , resp.) may grow exponentially with respect to its description size ...

متن کامل

Equality Testing of Compressed Strings

This paper gives a survey on efficient algorithms for checking equality of grammar-compressed strings, i.e., strings that are represented succinctly by so called straight-line programs.

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Chicago J. Theor. Comput. Sci.

دوره 2010  شماره 

صفحات  -

تاریخ انتشار 2010